package com.ylfstu.innerclass;

public class StaticInnerClass {
    public static void main(String[] args) {
        Outer05 outer05 = new Outer05();

        Outer05.Inner05 inner05 = new Outer05.Inner05();
        inner05.say();

        Outer05.Inner05 inner051 = outer05.getInner05();
        inner051.say();

        Outer05.Inner05 inner05_ = Outer05.getInner05_();
        inner05_.say();

    }
}

class Outer05 {
    private int n1 = 10;
    private static String name = "张三";

    private static void cry() {

    }

    //静态内部类
    static class Inner05 {
        public void say() {
            System.out.println(name);
            cry();
            Outer05 outer05 = new Outer05();
            outer05.n1 = 100;
        }
    }

    public void m1() {
        Inner05 inner05 = new Inner05();
        inner05.say();
    }

    public Inner05 getInner05() {
        return new Inner05();
    }

    public static Inner05 getInner05_() {
        return new Inner05();
    }
}
